//
//  YAObjGame.m
//  YoucApi
//
//  Created by Liam on 12-10-17.
//  Copyright 2012 __MyCompanyName__. All rights reserved.
//

#import "YAObjGame.h"


@implementation YAObjGame

@synthesize	gameId = _gameId;
@synthesize gameName = _gameName;
@synthesize gameType = _gameType;
@synthesize gameImage = _gameImage;
@synthesize gameTodayNum = _gameTodayNum;
@synthesize isAttention = _isAttention;

- (id)initWithCoder:(NSCoder *)decoder
{
	self = [super init];
	
	DECODE(gameId, Object);
	DECODE(gameName, Object);
	DECODE(gameType, Object);
	DECODE(gameImage, Object);
	DECODE(gameTodayNum, Int);
	DECODE(isAttention, Bool);
	
	return self;
}

- (void)encodeWithCoder:(NSCoder *)encoder
{
	ENCODE(gameId, Object);
	ENCODE(gameName, Object);
	ENCODE(gameType, Object);
	ENCODE(gameImage, Object);
	ENCODE(gameTodayNum, Int);
	ENCODE(isAttention, Bool);
}

- (void)dealloc
{
	SAFE_RELEASE(_gameId);
	SAFE_RELEASE(_gameName);
	SAFE_RELEASE(_gameType);
	SAFE_RELEASE(_gameImage);
	
	[super dealloc];
}

@end
